<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()
const go = (url) => {
    router.push(url)//动态跳转地址
}
</script>

<template>
    <el-container style="width:70%;height:600px;margin:auto;">
        <el-header style="width:100%;height:120px;background:rgb(198,226,255);">
        </el-header>
        <el-container>
            <el-aside style="width: 20%;height:400px;background:rgb(217,216,255);">
                <!-- <router-link to="/hello">首页</router-link><br>
                <router-link to="/news">新闻</router-link><br>
                <router-link to="/emp">员工</router-link><br> -->
                <el-button @click="go('/hello')">首页</el-button><br>
                <el-button @click="go('/news')">新闻</el-button><br>
                <el-button @click="go('/emp')">员工</el-button><br>
                <el-button @click="go('/users')">用户</el-button>
            </el-aside>
            <el-main style="width:80%;height:400px;">
                <router-view />
            </el-main>
        </el-container>
        <el-footer style="width:100%;height:120px;background:rgb(198,226,255);">
        </el-footer>
    </el-container>
</template>

<style scoped></style>
